home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Delphi Developer's Kit 1996
/
Delphi Developer's Kit 1996.iso
/
power
/
proptest
/
ubdialog.pas
< prev
Wrap
Pascal/Delphi Source File
|
1995-12-22
|
1KB
|
61 lines
unit Ubdialog;
interface
uses
SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
proptest,
Forms, Dialogs, StdCtrls, Grids;
type
TBDialog = class(TForm)
Edit1: TEdit;
Grid: TStringGrid;
Label1: TLabel;
Label2: TLabel;
Button1: TButton;
procedure Edit1Change(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
FB : TB;
public
property B : TB read FB write FB;
{ Public declarations }
end;
var
BDialog: TBDialog;
implementation
{$R *.DFM}
procedure TBDialog.Edit1Change(Sender: TObject);
begin
FB.A.Text := Edit1.Text;
end;
procedure TBDialog.FormShow(Sender: TObject);
var
i : integer;
begin
for i := 0 to 9 do
Grid.Cells[0,i] := IntToStr(FB.Arr[i]);
Edit1.Text := FB.A.Text;
end;
procedure TBDialog.FormClose(Sender: TObject; var Action: TCloseAction);
var
i : integer;
begin
for i := 0 to 9 do begin
if Grid.Cells[0,i] = '' then
FB.Arr[i] := 0
else
FB.Arr[i] := StrToInt(Grid.Cells[0,i]);
end;
end;
end.